package com.zib.vread.sinaweibo.mvp.view.fragment.unlogin;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.zib.vread.sinaweibo.R;
import com.zib.vread.sinaweibo.base.BaseFragment;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by vread on 2016/8/3.
 */
public class UnLoginHomeFragment extends BaseFragment {
    @Bind(R.id.register_toolbar)
    TextView registerToolbar;
    @Bind(R.id.login_toolbar)
    TextView loginToolbar;
    @Bind(R.id.toolbar_home_unlogin)
    RelativeLayout toolbarHomeUnlogin;
    @Bind(R.id.homeview)
    ImageView homeview;
    @Bind(R.id.circleView)
    ImageView circleView;
    @Bind(R.id.register)
    TextView register;
    @Bind(R.id.login)
    TextView login;

    @Override
    public int getLayoutId() {
        return R.layout.fragment_unlogin_home;
    }

    @Override
    public void initView() {
        Animation rotateAnim = AnimationUtils.loadAnimation(getContext(), R.anim.endlessrotate);
        LinearInterpolator lin = new LinearInterpolator();
        rotateAnim.setInterpolator(lin);
        circleView.setAnimation(rotateAnim);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }
}
